#include <iostream>
using namespace std;

int func(int m, int n)
{
	if(m == 0)
		return n + 1;
	if(n == 0)
		return func(m - 1, 1);
	return func(m - 1, func(m, n - 1));
}

int main()
{
	int n, m;
	cin >> m >> n;
	cout << func(m, n) << endl;
	return 0;
}
